﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DE.Interfaces
{
    /// <summary>
    /// Interface to be implemented by every DAL helper for every entity
    /// </summary>
    public interface IDALHelper
    {
        /// <summary>
        /// Insert new DE to the DB
        /// </summary>
        IBaseEntityData Create(IBaseEntityData de);

        /// <summary>
        /// Updates the data of a DE that exists in the DB
        /// </summary>
        void Update(IBaseEntityData de);

        /// <summary>
        /// Delete DE from DB
        /// </summary>
        /// <param name="id">The DE id to be deleted</param>
        void Delete(int id);

        /// <summary>
        /// Fetch the data of the requested DE from DB
        /// </summary>
        /// <param name="id">The DE id to fetch data to</param>
        IBaseEntityData Fetch(int userid,object additions);

        /// <summary>
        /// Validates the data of a given DE
        /// </summary>
        /// <returns>True if the data is legal, False if not</returns>
        int Validate(string username,string password, object additions);
    }
}
